← Back
Editing: index99.js
import{u as e,bu as a,L as t,B as s,e as l}from"./utils-lib.js?v=1765440387";import{c as o,W as n,X as r,b as d,aE as i,as as u,r as c,t as v,g as m,w as p,a1 as f,p as h,a5 as b,aM as y,q as _,v as g,y as w,F as x,a$ as C,x as k,L,C as A,M as E,A as I,H as $,I as M,e as j,N as B,J as R,aN as T,d as V,ay as S,z as W}from"./base-lib.js?v=1765440387";import{_ as H}from"./index100.js?v=1765440387";const N={class:"flex flex-col p-[1.2rem]"},O=["onClick"],q=l(o({__name:"index",props:n({options:{default:()=>[]},store:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},showContent:{type:Boolean,default:!0},contentClass:{default:"router-tabs-content"}},{modelValue:{},modelModifiers:{}}),emits:n(["cutTab","afterLeave"],["update:modelValue"]),setup(l,{emit:o}){const n=V(()=>t(()=>import("./index169.js?v=1765440387"),__vite__mapDeps([]),import.meta.url)),q=l,z=o,D=r(l,"modelValue"),{mainWidth:F,forceLtd:J,aliyunEcsLtd:P,payment:U,isHideAd:X}=e(),G=d(),K=i(),Q=u(q.options),Y=c(!0),Z=c(!1),ee=c("0px"),ae=c(0),te=c(),se=c(),le="".concat(G.path.split("/")[1],"_router").toUpperCase(),{authType:oe}=v(U.value),ne=m(()=>"router-tabs-content"===q.contentClass);p(()=>G.name,()=>{if(ue())ie(G.name),D.value=G.name;else{const e=localStorage.getItem(le)||Q.value[0].name;K.push({name:e}),ie(e),D.value=e}});const re=e=>{const a=e.target.offsetLeft,t=e.target.offsetWidth;ee.value="".concat(a+t-22,"px"),Z.value=!0},de=f(te,e=>{const a=e[0],{width:t}=a.contentRect;ae.value=t,Y.value=F.value-320>=ae.value}),ie=e=>{localStorage.setItem(le,e)},ue=()=>{const e=G.path.split("/");return e.length>2&&""!=e[2]},ce=(e,a=!0,t=!0)=>{D.value=e,a&&ie(e),G.name!==e&&t&&K.push({name:e})};return p(()=>s.value,e=>{var a;const t=e.find(e=>-1!==G.path.indexOf(e.path));if((null==t?void 0:t.children)&&Array.isArray(t.children)&&Q.value.forEach(e=>{const a=t.children.find(a=>e.path===a.name);e.show=!a||a.show}),!(null==(a=Q.value.find(e=>e.name===G.name))?void 0:a.show)){const e=Q.value.filter(e=>e.show);e&&e.length&&ce(e[0].name)}},{immediate:!0}),p(F,()=>{Y.value=F.value-320>=ae.value}),h(()=>{var e,t;const s=localStorage.getItem(le);if(Q.value.length||(Q.value=a(null==(e=G.matched[1])?void 0:e.children,"array",[])),"/mail"===(null==(t=G.matched[1])?void 0:t.path)&&Q.value.forEach(e=>{e.show=!0}),q.store)return ue()?ce(G.name):ce(s||Q.value[0].name)}),b(()=>{de.stop()}),(e,a)=>{const t=H,s=S,o=y("router-view");return _(),g("div",N,[w("div",{class:R(["header-tabs",{disabled:l.disabled}])},[w("div",{ref_key:"headerChildContentRef",ref:te,class:"flex flex-wrap"},[(_(!0),g(x,null,C(k(Q),(e,t)=>{var s,l;return _(),g(x,{key:t},[e.show?(_(),g("div",{key:0,ref_for:!0,ref_key:"tabListRef",ref:se,class:R(["header-child-tab",{"active-tab":D.value===e.name,"!hidden":null==(s=null==e?void 0:e.meta)?void 0:s.ignore}]),onClick:a=>((e,a=!1)=>{q.disabled||(D.value!==e||a)&&(ie(e),D.value=e,K.push({name:e}),z("cutTab",e))})(e.name),onMouseenter:re,onMouseleave:a[0]||(a[0]=e=>Z.value=!1)},W(null==(l=e.meta)?void 0:l.title),43,O)):A("",!0)],64)}),128))],512),e.$slots.right?L(e.$slots,"right",{key:0},void 0,!0):A("",!0),e.$slots.right?A("",!0):(_(),E(s,{key:1,width:"580",disabled:"free"!==k(oe),"show-arrow":!1,"popper-style":"padding: 0;border-radius: 16px;overflow: hidden;","popper-class":"el-product-state-popover"},{reference:I(()=>[$(j(t,{"is-home":!0,"disable-pro":!0},null,512),[[M,k(Y)&&!(k(J)||k(P))&&!k(X)]])]),default:I(()=>[(_(),E(B(k(n))))]),_:1},8,["disabled"]))],2),l.showContent?(_(),g("div",{key:0,class:R(["",{"module-ui":k(ne),"mt-[1.2rem]":k(ne)}])},[e.$slots.default?(_(),g("div",{key:0,class:R(l.contentClass)},[L(e.$slots,"default",{},void 0,!0)],2)):(_(),g("div",{key:1,class:R(l.contentClass)},[j(o,null,{default:I(({Component:e})=>[j(T,{name:"fade",mode:"out-in",onAfterLeave:a[1]||(a[1]=e=>z("afterLeave"))},{default:I(()=>[(_(),E(B(e)))]),_:2},1024)]),_:1})],2))],2)):A("",!0)])}}}),[["__scopeId","data-v-d31ba262"]]);export{q as _}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel